<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/31 0031
  Time: 21:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>
<script src="${path}/static/taoshunda/order/allOrder.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">
<script src="${path}/static/bootstrap/bootstrap-table/bootstrap-table.js"></script>


<div class="input-group col-xs-2" style="float: left;margin-bottom: 5px;">
    <input type="text" class="form-control entry" id="orderId" style="float: left;" placeholder="请输入订单编号">
</div>
<div class="input-group col-xs-2" style="float: left;margin-bottom: 5px;margin-left: 5px">
    <input type="text" class="form-control entry" id="nameUser" style="float: left" placeholder="请输入买家名称">
</div>


<div class="input-group col-xs-2" style="float: left;margin-bottom: 5px;margin-left: 5px">
    <input type="text" class="form-control entry" id="nameBusiness" style="float: left" placeholder="请输入卖家名称">
</div>

<div style="float: left;margin-left: 3px" class="input-group col-xs-1">
    <select id="select" class="form-control entry" style="width: 150%">
        <option value="-1">-订单状态-</option>
        <option value="0">全部</option>
        <option value="1">待付款</option>
        <option value="2">待接单</option>
        <option value="3">待配送</option>
        <option value="4">配送中</option>
        <option value="12">待取货</option>
        <option value="5">待评价</option>
        <option value="6">已完结</option>
        <option value="7">申请退款</option>
        <option value="8">拒绝接单</option>
        <option value="9">同意退款</option>
        <option value="10">拒绝退款</option>
        <option value="11">用户取消</option>
        <option value="13">申请退货</option>
        <option value="14">同意退货</option>
        <option value="15">拒绝退货</option>
        <option value="16">货物已归还商家</option>
    </select>
</div>

<div style="float: left;margin-left: 5%">
    <button type="button" class="btn query_button" onclick="queryNameOrder()"
            style="float: left;width: 100px;margin-bottom: 5px">
        <%--<span class="glyphicon glyphicon-search" aria-hidden="true"></span>--%>
        查询
    </button>
</div>

<table id="table"

       data-toggle="table"
       data-toolbar="#toolbar"
       data-url="${path}/web/order/queryOrder"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-field="id" data-visible="false">编号</th>
        <th data-field="orderNumber">订单编号</th>
        <th data-field="nickName">买家名称</th>
        <%--<th data-field="account">买家电话</th>--%>
        <th data-field="busName">卖家名称</th>
        <%--<th data-field="baccount">卖家电话</th>--%>
        <th data-field="deliveryName" data-formatter="deliveryName">配送员名称</th>
        <%--<th data-field="daccount" data-formatter="daccount">配送员电话</th>--%>
        <th data-field="allMoney">总金额</th>
        <th data-formatter="fee">小费</th>
        <th data-field="count">商品总数</th>
        <th data-formatter="Order.pay">支付方式</th>
        <th data-field="created">下单时间</th>
        <%--<th data-field="sendTime">送货时间</th>--%>
        <%--<th data-field="sendTime">时间</th>--%>
        <th data-formatter="orderState">订单状态</th>
        <th data-formatter="Order.status" data-events="operateEvents">操作</th>
    </tr>
    </thead>
</table>

<div id="findOrderDetail-div" class="slidingmenu box-model box box-info" model-width="80%" model-left="20%">

    <div class="box-header">
        <h3 class="box-title">订单商品详情</h3>
    </div>
    <div style="margin-left: 1%">
        <table id="orderTable"
               class="table table-striped table-bordered"
               data-toggle="table"
               data-toolbar="#toolbar"
               data-side-pagination="server"
               data-pagination="true"
               data-page-list="[5, 10, 20, 50, 100, 200]"
        >
            <thead>
            <tr>
                <th data-formatter="showPic">商品图片</th>
                <th data-field="goods_name">商品名称</th>
                <th data-field="univalent">单价</th>
                <th data-field="count">数量</th>
                <th data-formatter="goodsSpec">商品规格</th>
                <%--<th data-formatter="comment" data-events="operateComment">操作</th>--%>
            </tr>
            </thead>
        </table>
    </div>
    <div class="box-footer">
        <button class="btn close-model" style="background-color: red;color: snow">关闭</button>
    </div>
</div>

<div id="OrderInfo-div" class="slidingmenu box-model box box-info" model-width="70%" model-left="30%">

    <div class="box-header">
        <h3 class="box-title">订单详细信息</h3>
    </div>
    <div class="box-body">
        <input type="hidden" id="id">
        <div class="col-md-5">
            <div class="form-group">
                <label>收货人名称:</label>
                <input type="text" class="form-control " id="name" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>收货人地址:</label>
                <input type="text" class="form-control " id="goodsAdd" readonly="readonly"
                       required="required">
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>买家电话:</label>
                <input type="text" class="form-control " id="account" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>卖家电话:</label>
                <input type="text" class="form-control " id="baccount" readonly="readonly"
                       required="required">
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>配送员电话:</label>
                <input type="text" class="form-control " id="daccount" readonly="readonly"
                       required="required">
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>送货时间:</label>
                <input type="text" class="form-control " id="sendTime" readonly="readonly"
                       required="required">
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>到货时间:</label>
                <input type="text" class="form-control " id="endTime" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>距离:</label>
                <input type="text" class="form-control " id="distance" readonly="readonly"
                       required="required">
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>计划配送时间:</label>
                <input type="text" class="form-control " id="planTime" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>小费:</label>
                <input type="text" class="form-control " id="fee" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>配送费:</label>
                <input type="text" class="form-control " id="dispatching" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-5">
            <div class="form-group">
                <label>是否无理由退货:</label>
                <input type="text" class="form-control " id="refunds" readonly="readonly"
                       required="required" >
            </div>
        </div>
        <div class="col-md-8">
            <div class="form-group">
                <label>备注:</label>
                <input type="text" class="form-control " id="remark" readonly="readonly"
                       required="required">
            </div>
        </div>
        <div class="col-md-8">
            <div class="box-footer">
                <button class="btn close-model" style="background-color: red;color: snow">关闭</button>
            </div>
        </div>
    </div>
</div>

<div id="orderReason-div" class="slidingmenu box-model box box-info" model-width="45%" model-height="60%">

    <div class="box-header">
        <h3 class="box-title">订单拒绝原因</h3>
    </div>
    <input type="hidden" id="ids">
    <div class="form-group" style="margin-top: 5%">
        <label style="margin-left: 5%">拒绝原因:</label>
        <textarea type="text" class="form-control " id="reason" readonly="readonly"
                  required="required" style="width: 50%;height: 200px;margin-left: 5%"></textarea>
    </div>

    <div class="box-footer">
        <button class="btn close-model">关闭</button>
    </div>
</div>

<div id="fillReason-div" class="slidingmenu box-model box box-info" model-width="45%" model-height="60%">

    <div class="box-header">
        <h3 class="box-title">商家拒单</h3>
    </div>
    <form role="form" method="post" id="reasonFrom">
        <input type="hidden" id="orderIds" name="id">
        <input type="hidden" id="state" name="state">
        <input type="hidden" id="buyerId" name="buyerId">
        <input type="hidden" id="orderNumber" name="orderNumber">
        <input type="hidden" id="payType" name="payType">
        <div class="form-group" style="margin-top: 5%">
            <label style="margin-left: 5%">拒单原因:</label>
            <textarea type="text" class="form-control " required="required" name="reason" id="reasons"
                      style="width: 50%;height: 200px;margin-left: 5%"></textarea>
        </div>
    </form>
    <div class="box-footer">
        <button class="btn btn-info" data-event="submit-updateReason">确定</button>
        &nbsp;
        <button class="btn close-model" style="background-color: red;color: snow">关闭</button>
    </div>
</div>

<div id="orderComment-div" class="slidingmenu box-model box box-info" model-width="80%" model-left="20%">

    <div class="box-header">
        <h3 class="box-title">订单评论</h3>
    </div>
    <div style="margin-left: 1%">
        <table id="orderComment"
               class="table table-striped table-bordered"
               data-toggle="table"
               data-toolbar="#toolbar"
               data-side-pagination="server"
               data-pagination="true"
               data-page-list="[5, 10, 20, 50, 100, 200]"
        >
            <thead>
            <tr>
                <th data-formatter="showImag">评论图片</th>
                <th data-field="nickName">评论用户</th>
                <th data-field="busName">被评论商家</th>
                <th data-field="starNum">评论星级</th>
                <th data-field="created">评论时间</th>
                <%--<th data-formatter="comment" data-events="operateComment">操作</th>--%>
            </tr>
            </thead>
        </table>
    </div>
    <div class="box-footer">
        <button class="btn close-model" style="background-color: red;color: snow">关闭</button>
    </div>
</div>

<div id="detailImage-div" style="z-index:999"  class="slidingmenu box-model box box-info">
    <div class="box box-info">
        <div class="box-body">
            <div class="form-group">
                <div id="image" style="margin-top: 5%">

                </div>
            </div>
            <div class="box-footer">
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div><!-- /.box-body -->
    </div>
</div>